<form action="{{ path('app_order_tobuy', {'id':info['id']}) }}" method="get">
	<div class="row row-deck row-cards">
		<div class="col-sm-12 col-lg-6">
			<img class="object-fit-cover border rounded" src="{% if info['goodsImg'] %}{{ json_get(info['goodsImg'], 0) }}{% else %} /images/lesson_default.png {% endif %}"/>
		</div>
		<div class="col-sm-12 col-lg-6">
			<div class="card card-sm">
				<div class="card-header">
					<h3 class="card-title">{{ info['name'] }}</h3>
				</div>
				<div class="card-body">
					<div class="card-text mb-3 text-muted">
						<blockquote class="blockquote">{{ info['subhead']}}</blockquote>
					</div>
					{% if info['level'] == 0 %}
						<div class="card-text mb-3 text-muted">
							{% if info['childGoods'] %}
								<div class="hstack">
									{% for key2, item2 in info['childGoods'] %}
										<div class="p-2">
											<div class="form-check form-switch">
												<input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheck{{ item2['id'] }}" value="{{ item2['id'] }}" name="goodsId[]" title="{{ item2['name'] }}" {% if key2==0 %} checked {% endif %}/>
												<label class="form-check-label" for="flexSwitchCheck{{ item2['id'] }}">{{ item2['name'] }}</label>
											</div>
										</div>
									{% endfor %}
								</div>
							{% endif %}
						</div>
					{% else %}
						{% if info['childGoods'] %}
							{% for key1, item1 in info['childGoods'] %}
								<div class="card-text mb-3 text-muted">
									<div class="h3">{{ item1['name'] }}</div>
									<div class="hstack">
										{% for key2, item2 in item1['childGoods'] %}
											<div class="p-2">
												<div class="form-check form-switch">
													<input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheck{{ item2['id'] }}" value="{{ item2['id'] }}" name="goodsId[]" title="{{ item2['name'] }}" {% if key2==0 %} checked {% endif %}/>
													<label class="form-check-label" for="flexSwitchCheck{{ item2['id'] }}">{{ item2['name'] }}</label>
												</div>
											</div>
										{% endfor %}
									</div>
								</div>
							{% endfor %}
						{% endif %}
					{% endif %}
					<div class="card-text mb-3 text-muted">
						<div class="hstack">
							<div class="p-2">
								{% for item in info['tagsArr'] %}
									<span class="status status-azure">{{ item }}</span>
								{% endfor %}
							</div>
							<div class="p-2 ms-auto">
								{{ info['courseCount']}}课次/共{{ info['courseHour']}}课时
							</div>
						</div>
					</div>
					<div class="card-text mb-1 text-muted">
						<div class="hstack">
							<div class="p-2">{{ info['buyNumberView'] }}人报名</div>
							<div class="p-2 ms-auto">
								{% if info['shopPrice'] >0 %}
									<span class="badge bg-red">¥{{ info['shopPriceView'] }}</span>
								{% else %}
									<span class="badge bg-teal">免费</span>
								{% endif %}
							</div>
						</div>
					</div>
				</div>
				<div class="card-footer block-bg">
					<div class="row align-items-center">
						<div class="col-auto">
							{% if info['shopPrice']==0 %}
								<a href="{{ path('app_order_tobuy', {'id':info['id']}) }}" class="btn btn-danger btn-md">免费获取</a>
							{% else %}
								<button href="javascript:;" class="btn btn-danger btn-md" type="submit">立即购买</button>
							{% endif %}
						</div>
						<div class="col-auto ms-auto">
							<a href="{{ path('app_course_doFav', {'id':info['id']}) }}" id="fav">
								{% if fav %}
									<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-star-filled" width="24" height="24" viewbox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
										<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
										<path d="M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z" stroke-width="0" fill="currentColor"></path>
									</svg>
								{% else %}
									<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-star" width="24" height="24" viewbox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
										<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
										<path d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z"></path>
									</svg>
								{% endif %}
								<span id="favNum">{{ info['favNumber'] }}</span>
							</a>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</form>
